﻿using System;
using System.Collections.Generic;
using Matrix.MaKaYunShang.Model.Enum;

namespace Matrix.MaKaYunShang.Model
{
    /// <summary>
    ///马云卡优惠卷领用表
    /// </summary>
    public class UserCard
    {
        #region 默认属性
        /// <summary>
        /// Id
        /// </summary>		
        public int Id { get; set; }
        /// <summary>
        /// 马云卡卡卷id
        /// </summary>		
        public int CloudCardId { get; set; }
        /// <summary>
        /// 领用用户id
        /// </summary>		
        public int ReceiveUserId { get; set; }
        /// <summary>
        /// 卡号
        /// </summary>		
        public string CardCode { get; set; }
        /// <summary>
        /// 商家id
        /// </summary>		
        public int ShopId { get; set; }
        /// <summary>
        /// 领用来源  0固定二维码  1可变二维码  2收银单二维码  3转赠  4码云币购买
        /// </summary>		
        public int ReceiveSource { get; set; }
        /// <summary>
        /// 领用ip
        /// </summary>		
        public string ReceiveIp { get; set; }
        /// <summary>
        /// 经度
        /// </summary>		
        public string Longitude { get; set; }
        /// <summary>
        /// 纬度
        /// </summary>		
        public string Latitude { get; set; }
        /// <summary>
        /// 卡券状态  0未使用1已核销2转赠中3已转赠4售卖中5已售卖
        /// </summary>		
        public int CardStatus { get; set; }
        /// <summary>
        /// 转增方用户id(被转增人用户id)
        /// </summary>		
        public int DonationUserId { get; set; }
        /// <summary>
        /// 核销店铺ID
        /// </summary>		
        public int VerifyShopId { get; set; }
        /// <summary>
        /// 核销用户id(商家用户)
        /// </summary>		
        public int VerifyMerchantUserId { get; set; }
        /// <summary>
        /// 核销ip
        /// </summary>		
        public string VerifyIp { get; set; }
        /// <summary>
        /// 用户收货地址id(实物)
        /// </summary>		
        public int UserAddressId { get; set; }
        /// <summary>
        /// 实物发放类型   0未发放1现场发放2非现场发放
        /// </summary>		
        public int SendType { get; set; }
        /// <summary>
        /// 实物物流单号
        /// </summary>		
        public string LogisticsNum { get; set; }
        /// <summary>
        /// 实物物流公司
        /// </summary>		
        public string LogisticsCompany { get; set; }
        /// <summary>
        /// 红包发送流水号
        /// </summary>		
        public string RedSendSerialNumber { get; set; }
        /// <summary>
        /// 卡券售卖价格
        /// </summary>		
        public decimal SellingPrice { get; set; }
        /// <summary>
        /// 购买方userid
        /// </summary>		
        public int BuyUserId { get; set; }
        /// <summary>
        /// 售卖前卡券id
        /// </summary>		
        public int AfterSellingUserCardId { get; set; }
        /// <summary>
        /// 更新操作0 修改1转赠 2交易 3核销
        /// </summary>		
        public int UpdateOperat { get; set; }
        /// <summary>
        /// 发送卡卷店铺
        /// </summary>		
        public int SendCardShopId { get; set; }
        /// <summary>
        /// 领用时间
        /// </summary>		
        public DateTime AddTime { get; set; }
        /// <summary>
        /// 是否已删除（True已删除，False未删除）
        /// </summary>		
        public bool IsDelete { get; set; }
        #endregion

        #region 扩展属性
        /// <summary>
        /// 店铺logo
        /// </summary>
        public string ShopLoGo { get; set; }
        /// <summary>
        /// 店铺名称
        /// </summary>
        public string ShopName { get; set; }

        /// <summary>
        /// 是否可分享
        /// </summary>
        public bool CanShare { get; set; }

        /// <summary>
        /// 转增前卡券id
        /// </summary>		
        public int? BeforeDonationUserCardId { get; set; }

        /// <summary>
        /// 售卖成交时间
        /// </summary>		
        public DateTime? SellingDealTime { get; set; }
        /// <summary>
        /// 售卖挂牌时间
        /// </summary>		
        public DateTime? SellingListedTime { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>		
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 卡劵logo
        /// </summary>
        public string LoGo { get; set; }
        /// <summary>
        /// 卡劵标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime EndTime { get; set; }
        /// <summary>
        /// 卡券核销时间
        /// </summary>		
        public DateTime? VerifyTime { get; set; }
        /// <summary>
        /// 使用说明
        /// </summary>
        public string Instruction { get; set; }
        /// <summary>
        /// 免责声明
        /// </summary>
        public string Disclaimer { get; set; }
        /// <summary>
        /// 返回url
        /// </summary>
        public string ReturnUrl
        {
            get;
            set;
        }
        /// <summary>
        /// 类别id
        /// </summary>
        public int CardCategoryId { get; set; }
        /// <summary>
        /// 卡劵价值
        /// </summary>
        public decimal CardValue { get; set; }
        /// <summary>
        /// 商家名称
        /// </summary>
        public string MerchantName { get; set; }

        /// <summary>
        /// 类别
        /// </summary>
        public string CategoryCode { get; set; }
        /// <summary>
        /// 手机号码
        /// </summary>
        public string Mobile { get; set; }
        public string Description { get; set; }
        /// <summary>
        /// 卡券名称
        /// </summary>
        public string CardName { get; set; }
        /// <summary>
        /// 卡券状态显示文字
        /// </summary>
        public string CardStatusText
        {
            get { return ((CloudCardEnum.UserCardStatus)CardStatus).ToString(); }
        }
        public string Name { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string Address { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime StartTime { get; set; }
        /// <summary>
        /// 收货人姓名
        /// </summary>
        public string LinkMan { get; set; }
        /// <summary>
        /// 收货人电话
        /// </summary>
        public string LinkMobile { get; set; }
        /// <summary>
        /// 店铺描述
        /// </summary>
        public string ShopDescription { get; set; }
        /// <summary>
        /// 店铺地址
        /// </summary>
        public string ShopAddress { get; set; }
        /// <summary>
        /// 店铺电话
        /// </summary>
        public string ShopTel { get; set; }
        public decimal DiscountValue { get; set; }
        public string UsableShopIds { get; set; }

        #endregion
    }
}